/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jkoa.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "pengalaman")
@NamedQueries({
    @NamedQuery(name = "Pengalaman.findAll", query = "SELECT p FROM Pengalaman p")})
public class Pengalaman implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_pengalaman")
    private Integer idPengalaman;
    @Column(name = "id_mohon")
    private Integer idMohon;
    @Column(name = "id_pekerja")
    private Integer idPekerja;
    @Column(name = "kwsp")
    private String kwsp;
    @Column(name = "perkeso")
    private String perkeso;
    @Column(name = "nama_syarikat")
    private String namaSyarikat;
    @Column(name = "jawatan")
    private String jawatan;
    
    @ManyToOne
    @JoinColumn(name = "kod_bidang")
    private KodBidang bidang;
    
    @Column(name = "alamat_syarikat1")
    private String alamatSyarikat1;
    @Column(name = "alamat_syarikat2")
    private String alamatSyarikat2;
    @Column(name = "alamat_syarikat3")
    private String alamatSyarikat3;
    @Column(name = "alamat_syarikat4")
    private String alamatSyarikat4;
    @Column(name = "poskod_syarikat")
    private String poskodSyarikat;
    
    @ManyToOne
    @JoinColumn(name = "negeri_syarikat")
    private KodNegeri negeriSyarikat;
    @Column(name = "no_tel_syarikat")
    private String noTelSyarikat;
    @Column(name = "no_fax_syarilat")
    private String noFaxSyarilat;
    @Column(name = "trh_mula")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhMula;
    @Column(name = "trh_akhir")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhAkhir;
    @Column(name = "sbb_berhenti")
    private String sbbBerhenti;
    @Column(name = "gaji")
    private String gaji;
    @Column(name = "gaji_mohon")
    private String gajiMohon;
    @Column(name = "ulasan_kerja")
    private String ulasanKerja;
    @Basic(optional = false)
    
    @ManyToOne
    @JoinColumn(name = "dimasuk")
    private Pengguna dimasukOleh;
    
    @Basic(optional = false)
    @Column(name = "trh_masuk")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhMasuk;
    @Column(name = "dikkini")
    private String dikkini;
    @Column(name = "trh_kkini")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhKkini;

    public Pengalaman() {
    }

    public Pengalaman(Integer idPengalaman) {
        this.idPengalaman = idPengalaman;
    }

    public Pengalaman(Integer idPengalaman, Pengguna dimasukOleh, Date trhMasuk) {
        this.idPengalaman = idPengalaman;
        this.dimasukOleh = dimasukOleh;
        this.trhMasuk = trhMasuk;
    }

    public Integer getIdPengalaman() {
        return idPengalaman;
    }

    public void setIdPengalaman(Integer idPengalaman) {
        this.idPengalaman = idPengalaman;
    }

    public Integer getIdMohon() {
        return idMohon;
    }

    public void setIdMohon(Integer idMohon) {
        this.idMohon = idMohon;
    }

    public Integer getIdPekerja() {
        return idPekerja;
    }

    public void setIdPekerja(Integer idPekerja) {
        this.idPekerja = idPekerja;
    }

    public String getKwsp() {
        return kwsp;
    }

    public void setKwsp(String kwsp) {
        this.kwsp = kwsp;
    }

    public String getPerkeso() {
        return perkeso;
    }

    public void setPerkeso(String perkeso) {
        this.perkeso = perkeso;
    }

    public String getNamaSyarikat() {
        return namaSyarikat;
    }

    public void setNamaSyarikat(String namaSyarikat) {
        this.namaSyarikat = namaSyarikat;
    }

    public String getJawatan() {
        return jawatan;
    }

    public void setJawatan(String jawatan) {
        this.jawatan = jawatan;
    }

    public KodBidang getBidang() {
        return bidang;
    }

    public void setBidang(KodBidang bidang) {
        this.bidang = bidang;
    }

    public String getAlamatSyarikat1() {
        return alamatSyarikat1;
    }

    public void setAlamatSyarikat1(String alamatSyarikat1) {
        this.alamatSyarikat1 = alamatSyarikat1;
    }

    public String getAlamatSyarikat2() {
        return alamatSyarikat2;
    }

    public void setAlamatSyarikat2(String alamatSyarikat2) {
        this.alamatSyarikat2 = alamatSyarikat2;
    }

    public String getAlamatSyarikat3() {
        return alamatSyarikat3;
    }

    public void setAlamatSyarikat3(String alamatSyarikat3) {
        this.alamatSyarikat3 = alamatSyarikat3;
    }

    public String getAlamatSyarikat4() {
        return alamatSyarikat4;
    }

    public void setAlamatSyarikat4(String alamatSyarikat4) {
        this.alamatSyarikat4 = alamatSyarikat4;
    }

    public String getPoskodSyarikat() {
        return poskodSyarikat;
    }

    public void setPoskodSyarikat(String poskodSyarikat) {
        this.poskodSyarikat = poskodSyarikat;
    }

    public KodNegeri getNegeriSyarikat() {
        return negeriSyarikat;
    }

    public void setNegeriSyarikat(KodNegeri negeriSyarikat) {
        this.negeriSyarikat = negeriSyarikat;
    }

    public String getNoTelSyarikat() {
        return noTelSyarikat;
    }

    public void setNoTelSyarikat(String noTelSyarikat) {
        this.noTelSyarikat = noTelSyarikat;
    }

    public String getNoFaxSyarilat() {
        return noFaxSyarilat;
    }

    public void setNoFaxSyarilat(String noFaxSyarilat) {
        this.noFaxSyarilat = noFaxSyarilat;
    }

    public Date getTrhMula() {
        return trhMula;
    }

    public void setTrhMula(Date trhMula) {
        this.trhMula = trhMula;
    }

    public Date getTrhAkhir() {
        return trhAkhir;
    }

    public void setTrhAkhir(Date trhAkhir) {
        this.trhAkhir = trhAkhir;
    }

    public String getSbbBerhenti() {
        return sbbBerhenti;
    }

    public void setSbbBerhenti(String sbbBerhenti) {
        this.sbbBerhenti = sbbBerhenti;
    }

    public String getGaji() {
        return gaji;
    }

    public void setGaji(String gaji) {
        this.gaji = gaji;
    }

    public String getGajiMohon() {
        return gajiMohon;
    }

    public void setGajiMohon(String gajiMohon) {
        this.gajiMohon = gajiMohon;
    }

    public String getUlasanKerja() {
        return ulasanKerja;
    }

    public void setUlasanKerja(String ulasanKerja) {
        this.ulasanKerja = ulasanKerja;
    }

    public Pengguna getDimasukOleh() {
        return dimasukOleh;
    }

    public void setDimasuk(Pengguna dimasukOleh) {
        this.dimasukOleh = dimasukOleh;
    }

    public Date getTrhMasuk() {
        return trhMasuk;
    }

    public void setTrhMasuk(Date trhMasuk) {
        this.trhMasuk = trhMasuk;
    }

    public String getDikkini() {
        return dikkini;
    }

    public void setDikkini(String dikkini) {
        this.dikkini = dikkini;
    }

    public Date getTrhKkini() {
        return trhKkini;
    }

    public void setTrhKkini(Date trhKkini) {
        this.trhKkini = trhKkini;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPengalaman != null ? idPengalaman.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pengalaman)) {
            return false;
        }
        Pengalaman other = (Pengalaman) object;
        if ((this.idPengalaman == null && other.idPengalaman != null) || (this.idPengalaman != null && !this.idPengalaman.equals(other.idPengalaman))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jkoa.model.Pengalaman[ idPengalaman=" + idPengalaman + " ]";
    }
    
}
